<!DOCTYPE html>
<html lang="en">
<head>
    <title>老版本VUE示例</title>
</head>
<body>
    <div id="app">
        <h1 v-if="true">haha</h1> 

        <h1 v-show="isShow">v-show</h1> 
        <h1 v-if="isShow">v-if</h1> 
        <button @click="fun">切换</button>

        <h1 v-if="age>=18">XXX</h1>
        <button @click="add">增加年龄</button>
        
    </div>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <script>
        var app123 = new Vue({
            el:"#app",
            data:{
                isShow:false,
                age:16
            },
            methods:{
                fun:function(){
                    this.isShow=!this.isShow
                },
                add:function(){
                    this.age++
                }
            }
        })
    </script>
</body>
</html>